package com.binyouwei.designpatterns.behavior.memento;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 宾有为
 * @date 2024/7/16 19:44
 * @link https://blog.csdn.net/baidu_41616022?type=blog
 * @describe：
 **/
public class MementoCareTaker {
    private List<Memento> mementoList = new ArrayList<Memento>();

    public void add(Memento state){
        mementoList.add(state);
    }

    public Memento get(int index){
        return mementoList.get(index);
    }
}
